args=inputbox("new width=?",args,"12")

dim twidth
twidth = "w" & args'"w12"

Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")

dim fileContent

dim tempFile,fw
tempFile = application.activedocument.path & "\tmp.mcr"	
set fw = fso.createtextfile(tempFile, True)

fileContent = "Application.ModelessCommand(""W"")" & vbcrlf 
fw.writeline fileContent
fileContent = "DlgModelessCmd.Command = " & chr(34) & twidth & chr(34) & vbcrlf 
fw.writeline fileContent
fileContent =  "DlgModelessCmd.OnOk()"
fw.writeline fileContent

fw.close
set fw = nothing
set fso = nothing
Application.RunMacro(tempFile)



